﻿/*
 * Copyright (c) 2010, Sergey Loktin (mailto://shadowconsp@gmail.com)
 * Licensed under The MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Media.Imaging;
using MoonyPlugin;

namespace MoonyWeather
{
    public class MoonyWeatherPlugin : IPlugin
    {
        public double DefaultSize = 250;
        public double DefaultLeft = 400;
        public double DefaultTop = 20;

        public string Name { get { return "MoonyWeather"; } }
        public UIElement DesktopElement { get; private set; }

        public void Initialize()
        {
            DesktopElement = new MoonyWeatherCtrl();
        }

        public void Dispose()
        {
            DesktopElement = null;
        }

        public List<SettingsTab> GetNewSettingsTabs()
        {
            List<SettingsTab> tabs = new List<SettingsTab>();

            SettingsTab tab = new SettingsTab();
            tab.HeaderText = "Settings";
            tab.HeaderImageSource = new BitmapImage(new Uri("pack://application:,,,/MoonyWeather;component/settings.png"));
            tab.Content = new WeatherSettings(DesktopElement as MoonyWeatherCtrl);
            tabs.Add(tab);

            return tabs;
        }
    }
}
